package cn.com.yx.ms.persistence;

import cn.com.yx.ms.application.web.ApiQueryBase;
import cn.com.yx.ms.domain.dbmodel.JmControlMap;
import cn.com.yx.ms.domain.stl.StlJmMapModel;
import cn.com.yx.ms.domain.stl.StlScModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface JmControlMapMapper {
    int deleteByPrimaryKey(String guid);

    int insert(JmControlMap record);

    int insertSelective(JmControlMap record);

    JmControlMap selectByPrimaryKey(String guid);

    int updateByPrimaryKeySelective(JmControlMap record);

    int updateByPrimaryKey(JmControlMap record);

    List<StlScModel> selectAllJm(ApiQueryBase query);

    List<StlScModel> selectAllJmByControlid(@Param("modelid") String modelid,
                                            @Param("controlid") String controlid,
                                            @Param("regioncode") String regioncode
    );

    int updateByControlId(StlJmMapModel StlJmMapModel);


    int deleteJmControlMap(@Param("modelid") String modelid,
                              @Param("controlid") String controlid,
                              @Param("regioncode") String regioncode);

    int deleteJmAndControlMap(@Param("jmid") String jmid,
                              @Param("controlid") String controlid,
                              @Param("regioncode") String regioncode);

    int deleteJmAndControlMapByStyleId(@Param("styleId") String styleId,
                              @Param("modelId") String modelId);

    List<StlScModel> getScByJmid(String jmid);
}